package top.lyjwn.todo.weinxin.data.bjnews;

import java.util.List;

import com.alibaba.fastjson2.JSONObject;

public class WXBMessageTemplate {

	public Text text;

	public Image image;

	public Voice voice;

	public Video video;

	public Music music;

	public Mpnews mpnews;

	public Msgmenu msgmenu;

	public Template template;

	/**
	 * 文本消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Text implements WXBMessage {
		public String touser;
		public final String msgtype = "text";
		public text text;

		public class text {
			public String content;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 图片消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Image implements WXBMessage {
		public String touser;
		public final String msgtype = "image";
		public image text;

		public class image {
			public String media_id;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 语音消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Voice implements WXBMessage {
		public String touser;
		public final String msgtype = "voice";
		public voice voice;

		public class voice {
			public String media_id;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 视频消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Video implements WXBMessage {
		public String touser;
		public final String msgtype = "video";
		public video video;

		public class video {
			public String media_id;
			public String thumb_media_id;
			public String title;
			public String description;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 音乐消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Music implements WXBMessage {
		public String touser;
		public final String msgtype = "music";
		public music music;

		public class music {
			public String title;
			public String description;
			public String musicurl;
			public String hqmusicurl;
			public String thumb_media_id;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 图文消息（点击跳转到外链）
	 *
	 * @author luoyujie
	 *
	 */
	public class News implements WXBMessage {
		public String touser;
		public final String msgtype = "news";
		public List<article> news;

		public class article {
			public String title;
			public String description;
			public String url;
			public String picurl;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 图文消息（点击跳转到图文消息页面）
	 *
	 * @author luoyujie
	 *
	 */
	public class Mpnews implements WXBMessage {
		public String touser;
		public final String msgtype = "mpnews";
		public mpnews mpnews;

		public class mpnews {
			public String media_id;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 菜单消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Msgmenu implements WXBMessage {
		public String touser;
		public final String msgtype = "msgmenu";
		public msgmenu msgmenu;

		public class msgmenu {
			public String head_content;
			public List<option> list;
			public String tail_content;
		}

		public class option {
			public String id;
			public String content;
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

	/**
	 * 模板消息消息
	 *
	 * @author luoyujie
	 *
	 */
	public class Template implements WXBMessage {
		public String touser;
		public final String template_id = "FrWL4WGTdxxzKjdGbZPDrm9ejiu1Su1ipKSBY1qhWck";
		public String url;
		public data data;
		public String topcolor = "#173177";

		public class data {
			public first first;
			public keyword keyword1;
			public keyword keyword2;
			public keyword keyword3;
			public keyword keyword4;
			public remark remark;
		}

		public class first {
			public String value;
			public String color = "#173177";
		}

		public class keyword {
			public String value;
			public String color = "#173177";
		}

		public class remark {
			public String value;
			public String color = "#173177";
		}

		@Override
		public String toJSONString() {
			return JSONObject.toJSONString(this);
		}
	}

}
